feat(models): add data_table Block Kit block#1900
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add the net-new `data_table` block to the Block Kit models. The block displays structured, paginated data with a required caption. - DataTableBlock with rows (required), caption (required), page_size, row_header_column_index, and block_id - register the type in Block.parse and export it from slack_sdk.models.blocks - validators for required rows/caption and page_size range (1-100) - tests mirroring the existing TableBlock tests Ref: https://docs.slack.dev/reference/block-kit/blocks/data-table-block Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1900 +/- ##
==========================================
+ Coverage 84.14% 84.16% +0.02%
==========================================
Files 117 117
Lines 13356 13383 +27
==========================================
+ Hits 11238 11264 +26
- Misses 2118 2119 +1 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the net-new
data_tableBlock Kit block to the SDK models. The block displays structured, paginated data in a table with a required caption.DataTableBlockwithrows(required),caption(required),page_size,row_header_column_index, andblock_iddata_tabletype inBlock.parseDataTableBlockfromslack_sdk.models.blocksrows/captionandpage_sizerange (1-100)TableBlocktests (basic doc example, all fields, rich_text cells, empty-rows validation, required caption, page_size range)Cell types (
raw_text/raw_number/rich_text) are passed through as dicts, matching the existingTableBlockconvention in this repo.Reference
https://docs.slack.dev/reference/block-kit/blocks/data-table-block
Validation
Run in a fresh venv (
pip install -e ., Python 3.13):pytest tests/slack_sdk/models/test_blocks.py-> 90 passed (includes 6 newDataTableBlockTests)black --check --line-length 125-> 3 files unchangedflake8 --max-line-length 125-> cleanfrom slack_sdk.models.blocks import DataTableBlock-> imports OKOne block per PR;
data_visualizationis intentionally not included here.